package com.sc.passbook.log;

import com.alibaba.fastjson.JSON;
import lombok.extern.slf4j.Slf4j;

import javax.servlet.http.HttpServletRequest;

/**
 * @author sc
 * Created on  2018/9/1
 */
@Slf4j
public class LogGenerator {

    public static  void genLog(HttpServletRequest request,Long userId,String action,Object info){
        log.info(JSON.toJSONString(new LogObject(action,userId,System.currentTimeMillis(),request.getRemoteAddr(),info))) ;
    }
}
